package cn.edu.nuc.film.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.edu.nuc.film.entity.Order;

public interface OrderMapper {
	
	
	/**
	 * 通过userid来获取用户的订单
	 * @param userid
	 * @return
	 */
	List<Order> list( int userid);
	
	/**
	 * 生成订单
	 * @param order
	 * @return
	 */
	int insert(Order order);
	
	/**
	 * 查找相同的order
	 * @param userid
	 * @param filmId
	 * @return
	 */
	Order searchSameOrder( @Param("userid")int userid,@Param("filmId")int filmId,@Param("screensid")int screensid);
	
	/**
	 * 修改order
	 * @param record
	 * @return
	 */
	int updateByPrimaryKeySelective(Order record);

	
	/**
	 * 退票
	 * @param orderid
	 * @return
	 */
	int deleteByPrimaryKey(Integer orderid);
	
	int insertSelective(Order order);
	



    Order selectByPrimaryKey(Integer orderid);


    int updateByPrimaryKey(Order record);
}